package DB.Connection;

public enum TableType {

	USERS(0, "users"), CHARACTERS(1, "characters"), DATES(2, "dates"), COMMENTS(3, "comments"), FREEBASE_UPDATES(4, "freebase_updates"), REVIEWS(5, "reviews"), CHARTS(6, "Charts"), FAVORITES(7,
			"favorites");

	private int intRepresentation;
	private String strRepresentation;

	/**
	 * private constructor
	 * 
	 * @param intRep
	 * @param strRep
	 */
	private TableType(int intRep, String strRep) {
		this.intRepresentation = intRep;
		this.strRepresentation = strRep;
	}

	/**
	 * getter for the integer representation
	 * 
	 * @return
	 */
	public int getIntRep() {
		return this.intRepresentation;
	}

	/**
	 * getter for the string representation
	 * 
	 * @return
	 */
	public String getStrRep() {
		return this.strRepresentation;
	}

	/**
	 * A static method that converts the integer i to its OrderStatusEnum enum
	 * value
	 * 
	 * @param i
	 * @return table type
	 */
	public static TableType convertFromInt(int i) {
		return values()[i];
	}
}
